package com.itheima.io.encoding.demo03;

import java.io.UnsupportedEncodingException;
import java.sql.SQLOutput;

public class StringDemo03 {

    public static void main(String[] args) throws UnsupportedEncodingException {

        String s = "不净世";

//        byte[] bytes = s.getBytes();
        byte[] bytes = s.getBytes("GBK");
        String string = new String(bytes);
        System.out.println(string);
        System.out.println("---------------------");

        String string1 = new String(bytes, "GBK");
        System.out.println(string1);


    }


}
